@import "./util.less";

* {
  margin: 0;
  padding: 0;
  //box-sizing: content-box;
  box-sizing: border-box;
}

html {
  text-align: left;
  font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif;
  background-color: #fff;
  font-size: 14px;
  color: @htmlColor;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch; //流畅滚动
}

a, a:visited, a:hover, a:active, abbr {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: center;
  user-select: none;
  &::-moz-focus-inner {
    border: 0;
    padding: 0;
    margin: 0;
  }
}

a, input, button, textarea, select, [contenteditable], optgroup {
  outline: none;
  color: inherit;
  font-size: inherit;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /*去掉a、input和button点击时的蓝色外边框和灰色半透明背景*/
}

ul, li, div, aside {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

a /*, img*/ {
  -webkit-touch-callout: none; /*禁止长按链接与图片弹出菜单*/
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  font-size: inherit;
  cursor: default;
}

textarea {
  resize: none;
}

input, textarea, div, p {
  word-break: break-all;
}

ul, li {
  list-style: none;
}

select{
  &:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 @htmlColor;
  }
}

label, input[type="radio"], input[type="checkbox"] {
  cursor: pointer;
  user-select: none;
}

input[type=checkbox] {
  @width: 14px;
  @height: 14px;

  display: none;
  + label {
    position: relative;
    padding-left: @width+8px;
    &:before {
      content: '';
      height: @width;
      width: @height;
      display: inline-block;
      box-sizing: border-box;
      position: absolute;
      left: 0;
      top: 50%;
      margin-top: @height/2*-1;
      border-radius: 2px;
      border: 1px solid #d9d9d9
    }
  }

  &:checked + label {
    &:before {
      //background-color: #108ee9;
      //border-color: #108ee9;
      background-color: @green;
      border-color: @green;

      animation: checkboxEffect .4s ease;
    }
    &:after {
      content: '';
      width: 8px;
      height: 4px;
      display: inline-block;
      position: absolute;
      border: 2px solid #fff;
      border-top: none;
      border-right: none;
      transform: rotate(-45deg);
      left: 2px;
      top: 4px;
    }
  }
}

@keyframes checkboxEffect {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: .7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}






